﻿using SrBBSPro.BaseClasses;
using System.Collections.Generic;
using NPoco;

namespace SrBBSPro.Entities
{

    [TableName("ProMember")]
    [PrimaryKey("Id,No", AutoIncrement = false)]
    public  class ProMember : BaseDoubleEntity
    {
        public string Role { get; set; }

        [Ignore]
        public string RoleName
        {
            get => Roles[Role];
        }

        [Reference(ReferenceType.OneToOne, ColumnName = "Id", ReferenceMemberName = "Id")]
        public Project Project { get; set; }


        [Reference(ReferenceType.OneToOne, ColumnName = "No", ReferenceMemberName = "Id")]
        public User User { get; set; }

        [Ignore]
        private Dictionary<string, string> Roles = new Dictionary<string, string>()
        {
            {"1","项目经理" },
            {"2","技术开发" },
            {"3","工具开发" },
            {"4","测试人员" }
        };

    }
}
